﻿#region File and License Information
/*
<File>
	<License>
		Copyright © 2009 - 2017, Daniel Vaughan. All rights reserved.
		This file is part of Calcium (http://calciumsdk.net), 
		which is released under the MIT License.
		See file /Documentation/License.txt for details.
	</License>
	<CreationDate>2010-09-21 17:24:28Z</CreationDate>
</File>
*/
#endregion

using System;
using System.Collections.Generic;

namespace Outcoder.ComponentModel
{
	/* TODO: [DV] Comment. */
	public class ValidationCompleteEventArgs : EventArgs
	{
		public Exception Exception { get; private set; }
		public string PropertyName { get; private set; }
		public IEnumerable<DataValidationError> Errors { get; private set; }

		public ValidationCompleteEventArgs(string propertyName)
		{
			PropertyName = ArgumentValidator.AssertNotNull(
				propertyName, "propertyName"); ;
		}

		public ValidationCompleteEventArgs(string propertyName,
										   IEnumerable<DataValidationError> errors)
			: this(propertyName)
		{
			Errors = errors;
		}

		public ValidationCompleteEventArgs(string propertyName, Exception exception)
			: this(propertyName)
		{
			Exception = exception;
		}
	}
}